<template>
  <div>
    <el-tabs v-model="comName" @tab-click="handleClick">
      <el-tab-pane label="快递配送" name="LogistServe"></el-tab-pane>
    </el-tabs>
    <component :is="comName"></component>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
import CommitServe from "./rection/Index.vue";
import LogistServe from "./logistics/Index.vue";

@Component({
  components: {
    CommitServe,
    LogistServe,
  },
})
export default class Index extends Vue {
  /** 当前选中tab */
  comName = "LogistServe";

  mounted() {
    if (this.$route.query.from == "point") {
      this.comName = "CommitServe";
    }
  }

  /**
   * 切换组件
   */
  handleClick(tab) {
    this.comName = tab.name;
  }
}
</script>

<style lang="scss" scoped></style>
